//
//  FSUserInfo.m
//  FSiOSClient
//
//  Created by purlible on 2024/8/23.
//

#import "FSUserInfo.h"

@implementation FSUserInfo

+ (instancetype)sharedUserInfoManager
{
    static FSUserInfo *manager = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        manager = [[FSUserInfo alloc] init];
    });
    return manager;
}


/**
 清除用户信息
 */
- (void)clearUserInfo
{
  
}

//==============================系统信息============================
#pragma mark -- app版本号
- (void)setAppVersion:(NSString *)appVersion{
    [UserDefaults setObject:appVersion forKey:@"appVersion"];
}
- (NSString *)appVersion{
    return  [UserDefaults objectForKey:@"appVersion"];
}
#pragma mark -- 系统版本号
- (void)setSystemVersion:(NSString *)systemVersion{
    [UserDefaults setObject:systemVersion forKey:@"systemVersion"];
}
- (NSString *)systemVersion{
    return  [UserDefaults objectForKey:@"systemVersion"];
}
#pragma mark -- 手机型号
- (void)setPhoneModel:(NSString *)phoneModel{
    [UserDefaults setObject:phoneModel forKey:@"phoneModel"];
}
- (NSString *)phoneModel{
    return  [UserDefaults objectForKey:@"phoneModel"];
}
#pragma mark -- 当前设备UUID
- (void)setUuid:(NSString *)uuid{
    [UserDefaults setObject:uuid forKey:@"uuid"];
}
- (NSString *)uuid{
    return  [UserDefaults objectForKey:@"uuid"];
}
#pragma mark -- 推送deviceToken
- (void)setDeviceToken:(NSString *)deviceToken{
    [UserDefaults setObject:deviceToken forKey:@"deviceToken"];
}
- (NSString *)deviceToken{
    return  [UserDefaults objectForKey:@"deviceToken"];
}
#pragma mark -- 用水状态
- (void)setUserWaterStatu:(NSString *)userWaterStatu
{
    [UserDefaults setObject:userWaterStatu forKey:@"userWaterStatu"];
}
- (NSString *)userWaterStatu
{
    return  [UserDefaults objectForKey:@"userWaterStatu"];
}

//==============================账号信息============================
#pragma mark -- 账号
- (void)setPhone:(NSString *)phone
{
    [UserDefaults setObject:phone forKey:@"phone"];
}
- (NSString *)phone
{
    return  [UserDefaults objectForKey:@"phone"];
}
- (void)setWorkCode:(NSString *)workCode
{
    [UserDefaults setObject:workCode forKey:@"workCode"];
}
- (NSString *)workCode
{
    return  [UserDefaults objectForKey:@"workCode"];
}
#pragma mark -- 密码
-(void)setPassword:(NSString *)password{
    [UserDefaults setObject:password forKey:@"password"];
}
-(NSString *)password{
    return [UserDefaults objectForKey:@"password"];
}
#pragma mark -- 是否登录  // YES  NO
-(void)setHasLogin:(NSString *)hasLogin{
    [UserDefaults setObject:hasLogin forKey:@"hasLogin"];
}
-(NSString *)hasLogin{
    return  [UserDefaults objectForKey:@"hasLogin"];
}
- (void)setToken:(NSString *)token
{
    [UserDefaults setObject:token forKey:@"token"];
}
- (NSString *)token
{
    return  [UserDefaults objectForKey:@"token"];
}

//==============================用户信息============================
#pragma mark -- 用户Id
- (void)setUserId:(NSString *)userId{
    [UserDefaults setObject:userId forKey:@"userId"];
}
- (NSString *)userId{
    return  [UserDefaults objectForKey:@"userId"];
}
#pragma mark -- 用户姓名
- (void)setName:(NSString *)name{
    [UserDefaults setObject:name forKey:@"name"];
}
- (NSString *)name{
    return  [UserDefaults objectForKey:@"name"];
}
#pragma mark -- 用户性别
- (void)setGender:(NSString *)gender{
    [UserDefaults setObject:gender forKey:@"gender"];
}
- (NSString *)gender{
    return  [UserDefaults objectForKey:@"gender"];
}
#pragma mark -- 个性签名
- (void)setSignature:(NSString *)signature{
    [UserDefaults setObject:signature forKey:@"signature"];
}
- (NSString *)signature{
    return  [UserDefaults objectForKey:@"signature"];
}
#pragma mark -- 头像链接
- (void)setHeadImg:(NSString *)headImg{
    [UserDefaults setObject:headImg forKey:@"headImg"];
}
- (NSString *)headImg{
    return  [UserDefaults objectForKey:@"headImg"];
}
#pragma mark -- 余额
- (void)setBalance:(NSString *)balance
{
    [UserDefaults setObject:balance forKey:@"balance"];
}
- (NSString *)balance
{
    return  [UserDefaults objectForKey:@"balance"];
}
#pragma mark -- mac地址
- (void)setMacAdress:(NSString *)macAdress
{
    [UserDefaults setObject:macAdress forKey:@"macAdress"];
}
- (NSString *)macAdress
{
    return  [UserDefaults objectForKey:@"macAdress"];
}

#pragma mark -- 记录最后一笔商户订单号
- (void)setShopBillNum:(NSString *)shopBillNum
{
    [UserDefaults setObject:shopBillNum forKey:@"shopBillNum"];
}
- (NSString *)shopBillNum
{
    return  [UserDefaults objectForKey:@"shopBillNum"];
}

- (void)setLastSelectRoomInfo:(NSMutableArray *)lastSelectRoomInfo
{
    [UserDefaults setObject:lastSelectRoomInfo forKey:@"lastSelectRoomInfo"];
}
- (NSMutableArray *)lastSelectRoomInfo
{
    return  [UserDefaults objectForKey:@"lastSelectRoomInfo"];
}



@end
